package com.xiaohui.user.designPattern.strategy.handler;

import com.xiaohui.user.designPattern.strategy.PayFactory;
import com.xiaohui.user.designPattern.strategy.PayHandler;

import javax.annotation.Resource;

public class PayHandlerDemo {
    @Resource
    private PayFactory factory;

    public void dealPay(Integer code)
    {
        PayHandler handler = factory.getPayHandler(code);
        handler.dealPay();
    }
}
